package com.wc.alorithm_blue_bridge._数学知识.快速幂.逆元;

/**
 * @Author congge
 * @Date 2024/5/22 12:34
 * @description https://www.lanqiao.cn/problems/17133/learning/?problem_list_id=33&page=1
 */
public class Main {
    public static void main(String[] args) {
        long res = 0, p = 2146516019;
        for (long a = 1; a <= 233333333L; a++) {
            res ^= qkm(a, p - 2, p);
        }
        System.out.println(res);
    }

    static long qkm(long a, long b, long p) {
        long res = 1;
        while (b > 0) {
            if ((b & 1) == 1) res = res * a % p;
            a = a * a % p;
            b >>= 1;
        }
        return res;
    }
}

